fix: download browser-safe H.264 (fixes VP9/AV1 playback failures)#208
Merged
Conversation
The bv*+ba selector grabbed the best video-only stream, which on Instagram is VP9 and on YouTube AV1 — neither plays in Safari/iOS, so uploads silently became unwatchable for the (iPhone-heavy) group. Prefer the muxed/progressive H.264 format, fall back to a DASH merge only when no muxed exists, and sort all tiers toward h264/aac (+ --merge-output-format mp4) so fallbacks stay compatible. Verified against affected Instagram reels: output is h264/aac mp4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Friends couldn't play back videos they'd uploaded (Drew: two of his). Root cause: the
bv*+baformat selector added in 1.34.0 grabs the best video-only stream, which on Instagram is VP9 and on YouTube AV1 — neither plays in Safari/iOS. The group is iPhone-heavy, so affected uploads were silently unwatchable.Fix
Prefer the muxed/progressive H.264 format (which IG/TikTok serve alongside their VP9/AV1 DASH), fall back to a DASH merge only when no muxed exists, and sort every tier toward
h264/aacwith--merge-output-format mp4. Verified on affected reels: output ish264/aacmp4.Data repair (already applied to prod)
Re-downloaded the 16 existing VP9/AV1 clips group-wide as H.264 (in place, no credit/notification changes). 413 TikTok HEVC clips were intentionally left alone — HEVC plays natively on iOS.
Test plan
npm run checkcleannpm test529/529npm run buildok